package designpattern.demo.j2ee.frontcontrollerpattern.dispatcher;

import designpattern.demo.j2ee.frontcontrollerpattern.view.StudentView;
import designpattern.demo.j2ee.frontcontrollerpattern.view.HomeView;
public class Dispatcher {
    private StudentView studentView;
    private HomeView homeView;
    public Dispatcher(){
        studentView = new StudentView();
        homeView = new HomeView();
    }

    public void dispatch(String request){

        if(request.equalsIgnoreCase("STUDENT")){
            studentView.show();
        }else{
            homeView.show();
        }
    }
}